<div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
        <ul class="am-list admin-sidebar-list">
            {% for menu in tree %}
            {% if menu['is_hide'] == 0 %}
            {% if menu['is_group'] == 0 and menu['pid'] == 0  and menu['is_hide'] == 0 %}
            <li><a href="{{url(menu['url'])}}">{{menu['title']}}</a></li>
            {% endif %}
            {% if menu['is_group'] == 1 and menu['pid'] == 0  and menu['is_hide'] == 0 %}
            <li class="admin-parent">
                <a class="am-cf" data-am-collapse="{target: '#title{{menu['id']}}'}">
                {{menu['title']}}
                <span class="am-icon-angle-right am-fr am-margin-right"></span>
                </a>
            </li>
            <ul class="am-list am-collapse admin-sidebar-sub <?php if($nav['0']['url'] == $menu['url']){ echo 'am-in';}?> " id="title{{menu['id']}}">
                {% if menu['_child'] is empty %}
                {% else %}
                {% for childMenu in menu['_child'] %}
                {% if childMenu['is_hide'] == 0 %}
                <li>
                    <a href="{{url(childMenu['url'])}}" class="am-cf">
                    {{childMenu['title']}}
                    </a>
                </li>
                {% endif %}
                {% endfor %}
                {% endif %}
            </ul>
            {% endif %}
            {% endif %}
            {% endfor %}
        </ul>
        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p><span class="am-icon-bookmark"></span> 公告</p>
                <p>时光静好，与君语；细水流年，与君同。—— Amaze UI</p>
            </div>
        </div>
        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p><span class="am-icon-bookmark"></span> 公告</p>
                <p>时光静好，与君语；细水流年，与君同。—— Amaze UI</p>
            </div>
        </div>
    </div>
</div>
